package com.aspirecn.order.client;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.aspirecn.order.domain.RequestMsg;
import com.aspirecn.order.domain.ResponseMsg;
import com.aspirecn.order.domain.vo.QueryUserInfoByUserNameInVo;
import com.aspirecn.order.domain.vo.QueryUserInfoByUserNameOutVo;

/**
 * 通过路由访问服务
 * @author chenyuanli
 */
@FeignClient(name = "gateway-service")
public interface UserServiceClient {

	/**
	 * 发送rest请求并接收响应，自动序列化和反序列化json
	 * @param request
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE, value = "/user/queryUserInfoByUserName", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
	ResponseMsg<QueryUserInfoByUserNameOutVo> queryUserInfoByUserName(RequestMsg<QueryUserInfoByUserNameInVo> request);
	
}
